package com.itheima.io.outputstream.demo02;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class OutputStreamDemo02 {

    public static void main(String[] args) throws IOException {

        OutputStream outputStream = new FileOutputStream("itheima-io-outputstream\\b.text");

        byte[] bytes = {97, 98, 99, 100} ;
//        outputStream.write(bytes);
//        outputStream.write(bytes, 0, 2);

        String s = "lanwangji daolv weiwuxian";
        byte[] bytes1 = s.getBytes();
        outputStream.write(bytes1);

        outputStream.close();

    }
}
